﻿<Window x:Class="RvmImporter.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Importer" Height="480" Width="640">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="26"/>
            <RowDefinition/>
            <RowDefinition Height="26"/>
        </Grid.RowDefinitions>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="100"/>
            </Grid.ColumnDefinitions>
            <TextBlock VerticalAlignment="Center">Imported:</TextBlock>
            <Button x:Name="ConnectButton" Grid.Column="1" Margin="5,2" Click="OnConnectClick">Connect</Button>
            <Button x:Name="ConnectAllButton" Click="OnConnectAllClick"  Grid.Column="2" Margin="5,2">Connect All</Button>
            <Button x:Name="DisonnectButton" Grid.Column="3" Margin="5,2" Click="OnDisconnectClick">Disconnect</Button>
        </Grid>
        <TabControl Grid.Row="1" x:Name="Imports">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Simple.Id}"/>
                </DataTemplate>
            </TabControl.ItemTemplate>
            <TabControl.ContentTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <!-- Simple -->
                        <Grid Background="LightGreen" Margin="5">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="26"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="100"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Simple.NestedSimple.Test}" Margin="3" HorizontalAlignment="Left"/>
                            <Button Grid.Column="1" Margin="5,2" Command="{Binding Simple.SomeAction}">Do</Button>
                            <TextBlock Grid.Column="2" Text="{Binding Simple.NestedTraditional.Test}" Margin="3" HorizontalAlignment="Right"/>
                            <TextBox Grid.ColumnSpan="3" Grid.Row="1" Text="{Binding Simple.Message, UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" Margin="5"/>
                            <ListBox Grid.Column="2" Grid.Row="1" ItemsSource="{Binding Simple.Nerds}" Margin="5"/>
                        </Grid>
                        <!-- Traditional -->
                        <Grid Grid.Column="1" Background="Plum" Margin="5">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="26"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="100"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Traditional.NestedSimple.Test}" Margin="3" HorizontalAlignment="Left"/>
                            <Button Grid.Column="1" Margin="5,2" Command="{Binding Traditional.SomeAction}">Do</Button>
                            <TextBlock Grid.Column="2" Text="{Binding Traditional.NestedTraditional.Test}" Margin="3" HorizontalAlignment="Right"/>
                            <TextBox Grid.ColumnSpan="3" Grid.Row="1" Text="{Binding Traditional.Message, UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" Margin="5"/>
                            <ListBox Grid.Column="2" Grid.Row="1" ItemsSource="{Binding Traditional.Nerds}" Margin="5"/>
                        </Grid>
                    </Grid>
                </DataTemplate>
            </TabControl.ContentTemplate>
        </TabControl>
        <TextBlock Grid.Row="2" VerticalAlignment="Center">Exporting Sources:</TextBlock>
        <ListBox x:Name="PList" Grid.Row="3"/>
        <Grid Grid.Row="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" Margin="5,2" Click="OnRefreshProcessesClick">Refresh Sources</Button>
            <Button Grid.Column="2" Margin="5,2" Click="OnStartNewProcessClick">Start Console</Button>
        </Grid>
    </Grid>
</Window>
